import requests as rq

# import dns.resolver

# a = dns.resolver.query("www.baidu.com", 'A')
# ip = a.response.answer[0].items[0].address

rp = rq.get("http://www.tstdoors.com/ldks/41593/5330207_2.html")

# rp   response 对象

print(rp.text)
print('-' * 40)
print(rp.content)

rp.encoding = rp.apparent_encoding  # 根据我获得的网页信息，来猜该网页使用什么编码，并自动设置
# 等效于 rp.encoding = "utf-8"

print(rp.text)
